package com.bawei.module_main.adapter


import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 *作者：lxy
 *功能:
 *时间：2025/6/10
 */
class MainViewPageAdapter(fragmentActivity: FragmentActivity,private val fragments:List<Fragment>):FragmentStateAdapter(fragmentActivity) {
    override fun getItemCount(): Int {
        return fragments.size
    }

    override fun createFragment(position: Int): Fragment {
        return fragments[position]
    }
}